﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace InformationSystem
{
    //this class using singleton design patten
    public class ISUtils
    {
        static ISUtils isUtils = null;

        static Object obj = new Object();

        public int USER_TYPR_ADMIN = 1;
        public int USER_TYPE_STUDENT = 2;

        public int USER_STATUS_DEACTIVE = 1;
        public int USER_STATUS_ACTIVE = 2;

        
        public int PROGRAMME_STATUS_START = 1;
        public int PROGRAMME_STATUS_ACTIVE = 2;
        public int PROGRAMME_STATUS_END = 3;
        
        private ISUtils()
        { 
        
        }

        public static ISUtils getInstance()
        {
            lock (obj)
            {
                if (null == isUtils)
                {
                    isUtils = new ISUtils();
                }
            }
            

            return isUtils;
        }

        public string encode(string str)
        {
            string htext = "";

            for (int i = 0; i < str.Length; i++)
            {
                htext = htext + (char)(str[i] + 10 - 1 * 2);

            }

            return htext;
        }


    }
}
